package com.totoro.tyrank.data;

import com.totoro.tyrank.annotation.TableField;
import com.totoro.tyrank.sql.RowMapper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.ResultSet;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PlayerData implements RowMapper<PlayerData> {
    /* 玩家标识 */
    @TableField("player_identity")
    private String playerIdentity;
    /* 所在排行榜Id */
    @TableField("rank_id")
    private String rankId;
    /* 排名 */
    private Integer ranking;
    /* 值 */
    @TableField("current_value")
    private String currentValue;
    /* 是否领取过 */
    @TableField(value = "reward_receive", mappingType = Boolean.class)
    private Boolean rewardReceive;
    /* 数据更新时间，仅显示 */
    @TableField("update_date_time")
    private String updateDateTime;

    /* 是否清除，是不存在实际上的数据库表或文件节点里的字段 */
    private Boolean isClear;

    @Override
    public PlayerData map(ResultSet rs) throws Exception {
        return null;
    }
}
